package com.yfree;

import com.yfree.BuildConfig;
import com.yfree.R;
import com.yfree.interfaces.YOnHTTPHeader;

public final class YConfig {
    //设备
    public static String device = "android";

    // Log配置
    public static final boolean DEBUG = BuildConfig.DEBUG;// 开发者模式，此处不可设置为true！！！
    public static String YLOGTAG = "YFreeLog";
    public static boolean canShowToast = true;

    //权限配置
    public static String requestPermissonMessage = "温馨提示：为带给用户更好的视觉体验和流畅的品质，需要获取您的一次权限，请授权。";

    // app内截图限制
    public static boolean stopScreenShotAble = false;

    // 异常接管器
    public static boolean yCrashHandlerAble = true;
    public static Class restartActivity;

    // 图片资源
    public static int logo_icon = R.drawable.logo_icon_default;// logo
    public static int logo_icon_progress;// 圆形logo
    public static int statubar = R.drawable.statubar;// 状态条
    public static boolean isSetPicDefault = true;// 加载时和加载失败时是否加载默认图片
    public static int loadingImage = R.drawable.loading; // 加载失败显示的图片
    public static int loadingFailImage = R.drawable.loadingfail; // 加载失败显示的图片
    public static boolean isStatuBarTinkDark = false; // 状态栏内容暗色

    // 服务器配置
    public static String IP;
    public static String UPDATEIP;
    public static String JKXLH;
    public static String checkUpdateInterface;
    public static String commitErrorLog;
    public static int yPostTimeOut = 30 * 1000;
    public static int yPostTimeDelay;
    public static boolean compressParamsAble;
    public static boolean encryptParamsAble;
    public static String encryptParamsKey = "0000000000000000";
    public static String localEncryptParamsKey = "YFreeLocalEncryptParamsKey";
    public static YOnHTTPHeader onYHTTPHeader;

    // 本地错误日志配置
    public static float LOG_FILE_SIZE = 1024;// 单个日志文件的大小,单位KB
    public static String LOG_FILE_NAME = "YLog";
    public static String DEVICE_FILE_NAME = "YDevice";
    public static String crashMsg = "很抱歉，app运行出错了，请您放心，攻城狮们会积极改进，请您期待后续版本，感谢您的支持！";

    // 本地数据库配置
    public static String dbName = "YDataBase.db3";
    public static int dbVersion = 1;

    public static class YDBTableSQL {
        public static String[] tableNames;
        public static String[] createTableSqls;
    }

    // 加载进度条是否可被取消
    public static boolean progressBarCancelable = false;

    // App默认工作目录目录
    public static boolean checkSDCard = true;
    public static int MINSDCARDSPACE = 50;//单位M
    public static String YFreeDir = "/YFreeDir";
    public static String PROJECTBASEDIR = "/YApp";
    public static String updateDir = "/YUpdate";
    public static String FINALBITMAPCACHEDIR = "/YFBCache";
    public static String LOGPATH = "/YLog";
    public static String DEVICEPATH = "/YDevice";

    // 图片压缩百分比
    public static int bitmapQuality = 50;
    public static float maxBitmapSize = 1500f;
    public static int maxBitmapKB = 100;

    // 适配器动画时长
    public static int adapterAnimTime = 500;

    public static final String YSHAREDPREFERENCESNAME = "ySharedPreferences";

    public static class YBundleKey {
        public static final String yCrashMSG = "yCrashMSG";
        public static final String yCrashIP = "yCrashIP";
        public static final String yCrashJKID = "yCrashJKID";
        public static final String yCrashAlertMSG = "yCrashAlertMSG";
        public static final String yCrashRestartActivity = "yCrashRestartActivity";
    }

    private YConfig() {
    }
}
